//
//  DJAutoLayoutHeadView.swift
//  dj-learn-Swift
//
//  Created by Sun Jae on 2022/5/6.
//  Copyright © 2022 S.J. All rights reserved.
//

import UIKit

class DJAutoLayoutNavView: UIView {

    let imageView  = UIImageView()
    let titleLabel = UILabel()
    
    convenience init() {
        self.init(frame: .zero)
        //
        self.addSubview(imageView)
//        self.imageView.image = UIImage(named: "home_nav")
        self.imageView.snp.makeConstraints { (make) in
            make.edges.equalTo(self)
        }
        
        //
        self.titleLabel.text = "首页"
        self.titleLabel.textColor = UIColor.white
        self.addSubview(self.titleLabel)
        self.titleLabel.snp.makeConstraints { (make) in
            make.centerY.equalTo(self)
            make.centerX.equalTo(self)
        }
    }
}
